package com.qiahao.mapper;

import com.qiahao.bean.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Administrator on 2018/4/3 0003.
 */

public interface RoleMapper {

    @Select("select * from user_role ")
    List<Role> getRoleList();

    @Select("SELECT * FROM `user_role` WHERE id = #{id}")
    Role findRoleById(Long id);

    @Select("SELECT a.role_name  as role FROM `user_role a` WHERE a.id = #{id}")
    Role findRoleNameById(Long id);
}
